clear
rng default


workers=500; %number of parallel workers

IdSetM_temp=cell(workers,1);
miss=[];
for ii = 1:workers
    if isfile(['IdSetM.' num2str(ii) '.mat'])
       load(['IdSetM.' num2str(ii) '.mat']);
       IdSetM_temp{ii}= IdSetM;
    else
        miss=[miss ii];
    end
end

IdSetM_final= vertcat(IdSetM_temp{:}); 

save('IdSetM_final.mat', 'IdSetM_final')